<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>运单管理</title>
	<meta name="decorator" content="ani"/>
	<script type="text/javascript">
        var validateForm;
        var $table; // 父页面table表格id
        var $topIndex;//弹出窗口的 index
        function doSubmit(table, index){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
            if(validateForm.form()){
                $table = table;
                $topIndex = index;
                jp.loading();
                $("#inputForm").submit();
                return true;
            }

            return false;
        }

        $(document).ready(function() {
            validateForm = $("#inputForm").validate({
                submitHandler: function(form){
                    jp.post("${ctx}/tms/tmsWaybill/save",$('#inputForm').serialize(),function(data){
                        if(data.success){
                            $table.bootstrapTable('refresh');
                            jp.success(data.msg);
                            jp.close($topIndex);//关闭dialog

                        }else{
                            jp.error(data.msg);
                        }
                    })
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
            $('#date').datetimepicker({
                format: "YYYY-MM-DD HH:00"
            });
            $('#deliveryTime').datetimepicker({
                format: "YYYY-MM-DD HH:00"
            });
            $('#arrivalTime').datetimepicker({
                format: "YYYY-MM-DD HH:00"
            });
            $('#stowageDate').datetimepicker({
                format: "YYYY-MM-DD HH:00"
            });
            $('#presentTime').datetimepicker({
                format: "YYYY-MM-DD HH:00"
            });
        });

        function addRow(list, idx, tpl, row){
            $(list).append(Mustache.render(tpl, {
                idx: idx, delBtn: true, row: row
            }));
            $(list+idx).find("select").each(function(){
                $(this).val($(this).attr("data-value"));
            });
            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
                var ss = $(this).attr("data-value").split(',');
                for (var i=0; i<ss.length; i++){
                    if($(this).val() == ss[i]){
                        $(this).attr("checked","checked");
                    }
                }
            });
            $(list+idx).find(".form_datetime").each(function(){
                $(this).datetimepicker({
                    format: "YYYY-MM-DD HH:00"
                });
            });
        }
        function delRow(obj, prefix){
            var id = $(prefix+"_id");
            var delFlag = $(prefix+"_delFlag");
            if (id.val() == ""){
                $(obj).parent().parent().remove();
            }else if(delFlag.val() == "0"){
                delFlag.val("1");
                $(obj).html("&divide;").attr("title", "撤销删除");
                $(obj).parent().parent().addClass("error");
            }else if(delFlag.val() == "1"){
                delFlag.val("0");
                $(obj).html("&times;").attr("title", "删除");
                $(obj).parent().parent().removeClass("error");
            }
        }
        function chek(a,b) {
            var c=a.value;
            alert(c);
            if(parseInt(c)>parseInt(b)){
                alert("派车量不能大于剩余数量！");
                this.value="";

            }

        }
	</script>
</head>
<body class="bg-white">
<form:form id="inputForm" modelAttribute="tmsWaybill" action="${ctx}/tms/tmsWaybill/save" method="post" class="form-horizontal">
<form:hidden path="id"/>
<sys:message content="${message}"/>
<ul class="nav nav-tabs">
	<li class="active"><a data-toggle="tab" href="#tab-01" aria-expanded="true">订单详情</a>
	</li>
	<li class=""><a data-toggle="tab" href="#tab-02" aria-expanded="true">服务信息</a>
	</li>
	<li class=""><a data-toggle="tab" href="#tab-03" aria-expanded="true">配载信息</a>
	</li>
	<li class=""><a data-toggle="tab" href="#tab-04" aria-expanded="true">费用信息</a>
	</li>
	<c:if test="${notnode!=null||tailAfter!=null}">
	<li class=""><a data-toggle="tab" href="#tab-05" aria-expanded="true">在途跟踪</a>
	</li></c:if>
	<c:if test="${receipt!=null}">
	<li class=""><a data-toggle="tab" href="#tab-06" aria-expanded="true">回单签收</a>
	</li></c:if>
	<c:if test="${accident!=null}">
	<li class=""><a data-toggle="tab" href="#tab-07" aria-expanded="true">质量事故处理</a>
	</li></c:if>
</ul>
<div class="tab-content">
	<div id="tab-01" class="tab-pane fade in  active">
		<table class="table table-bordered">
			<tbody>
			<tr>
				<td class="width-10 active"><label class="pull-right">装运单号：</label></td>
				<td class="width-23">
					<form:input path="shipmentNumbers" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">下单日期：</label></td>
				<td class="width-23">
					<div class='input-group form_datetime' id='date'>
						<input type='text'  name="date" class="form-control "  value="<fmt:formatDate value="${tmsWaybill.date}" pattern="yyyy-MM-dd HH:00"/>"/>
						<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
					</div>
				</td>
				<td class="width-10 active"><label class="pull-right">要求发货时间：</label></td>
				<td class="width-23">
					<div class='input-group form_datetime' id='deliveryTime'>
						<input type='text'  name="deliveryTime" class="form-control "  value="<fmt:formatDate value="${tmsWaybill.deliveryTime}" pattern="yyyy-MM-dd HH:00"/>"/>
						<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
					</div>
				</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">收货详细地址：</label></td>
				<td class="width-23">
					<form:input path="site" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">到站省：</label></td>
				<td class="width-23">
					<form:input path="arriveProvince" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">到站地城市：</label></td>
				<td class="width-23">
					<form:input path="arriveCity" htmlEscape="false"    class="form-control "/>
				</td>
			</tr>
			<tr>

				<td class="width-10 active"><label class="pull-right">收货单位名称：</label></td>
				<td class="width-23">
					<form:input path="unitName" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">收货单位确认人：</label></td>
				<td class="width-23">
					<form:input path="unitConfirmor" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">确认人电话：</label></td>
				<td class="width-23">
					<form:input path="phone" htmlEscape="false"    class="form-control "/>
				</td>
			</tr>

			<tr>

				<td class="width-10 active"><label class="pull-right">合同里程：</label></td>
				<td class="width-23">
					<form:input path="distance" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">运输线路：</label></td>
				<td class="width-23">
					<form:input path="transitLines" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">备注信息：</label></td>
				<td class="width-23">
					<form:input path="remarks" htmlEscape="false"     class="form-control "/>
				</td>
			</tr></tbody></table>
		<div class="tabs-container">
			<ul class="nav nav-tabs">
				<li class="active"><a data-toggle="tab" href="#tab-2" aria-expanded="false">运单物料信息：</a>
				</li>
			</ul>
			<div class="tab-content">

				<div id="tab-2" class="tab-pane fade in active">
					<a class="btn btn-white btn-sm" onclick="addRow('#tmsMaterialsInformationList', tmsMaterialsInformationRowIdx, tmsMaterialsInformationTpl);tmsMaterialsInformationRowIdx = tmsMaterialsInformationRowIdx + 1;" title="新增"><i class="fa fa-plus"></i> 新增</a>
					<table class="table table-striped table-bordered table-condensed">
						<thead>
						<tr>
							<th class="hide"></th>

							<th width="10%"><span style="color: red">*</span>提货单号</th>
							<th width="14%"><span style="color: red">*</span>物料编码</th>
							<th width="28%"><span style="color: red">*</span>物料名称</th>
							<th width="8%">物料规格</th>
							<th width="6%">派车量</th>
							<th width="6%"><span style="color: red">*</span>装车量</th>
							<th width="6%">毛重(吨)</th>
							<th width="6%">体积(M3)</th>
							<th width="14%"><span style="color: red">*</span>提货仓库</th>
							<th width="10">&nbsp;</th>
						</tr>
						</thead>
						<tbody id="tmsMaterialsInformationList">
						</tbody>
					</table>
					<script type="text/template" id="tmsMaterialsInformationTpl">//<!--
				<tr id="tmsMaterialsInformationList{{idx}}">
					<td class="hide">
						<input id="tmsMaterialsInformationList{{idx}}_id" name="tmsMaterialsInformationList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
						<input id="tmsMaterialsInformationList{{idx}}_delFlag" name="tmsMaterialsInformationList[{{idx}}].delFlag" type="hidden" value="0"/>
					</td>

					<td>
						<input id="tmsMaterialsInformationList{{idx}}_number" name="tmsMaterialsInformationList[{{idx}}].number" type="text" value="{{row.number}}"    class="form-control "/>
					</td>


					<td>
						<input id="tmsMaterialsInformationList{{idx}}_coding" name="tmsMaterialsInformationList[{{idx}}].coding" type="text" value="{{row.coding}}"    class="form-control "/>
					</td>


					<td>
						<input id="tmsMaterialsInformationList{{idx}}_name" name="tmsMaterialsInformationList[{{idx}}].name" type="text" value="{{row.name.name}}"    class="form-control "/>
					</td>


					<td>
						<input id="tmsMaterialsInformationList{{idx}}_specification" name="tmsMaterialsInformationList[{{idx}}].specification" type="text" value="{{row.specification}}"    class="form-control "/>
					</td>





					<td>
						<input id="tmsMaterialsInformationList{{idx}}_vehicleQuantity" name="tmsMaterialsInformationList[{{idx}}].vehicleQuantity" type="text" value="{{row.vehicleQuantity}}"    class="form-control "/>
					</td>


					<td>
						<input id="tmsMaterialsInformationList{{idx}}_loadingQuantity" name="tmsMaterialsInformationList[{{idx}}].loadingQuantity" type="text" value="{{row.loadingQuantity}}"    class="form-control "/>
					</td>


					<td>
						<input id="tmsMaterialsInformationList{{idx}}_weight" name="tmsMaterialsInformationList[{{idx}}].weight" type="text" value="{{row.weight}}"    class="form-control "/>
					</td>


					<td>
						<input id="tmsMaterialsInformationList{{idx}}_volume" name="tmsMaterialsInformationList[{{idx}}].volume" type="text" value="{{row.volume}}"    class="form-control "/>
					</td>


					<td>
						<input id="tmsMaterialsInformationList{{idx}}_depot" name="tmsMaterialsInformationList[{{idx}}].depot" type="text" value="{{row.depot}}"    class="form-control "/>
					</td>




					<td class="text-center" width="10">
						{{#delBtn}}<span class="close" onclick="delRow(this, '#tmsMaterialsInformationList{{idx}}')" title="删除">&times;</span>{{/delBtn}}
					</td>
				</tr>//-->
					</script>
					<script type="text/javascript">
                        var tmsMaterialsInformationRowIdx = 0, tmsMaterialsInformationTpl = $("#tmsMaterialsInformationTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        $(document).ready(function() {
                            var data = ${fns:toJson(tmsWaybill.tmsMaterialsInformationList)};
                            for (var i=0; i<data.length; i++){
                                addRow('#tmsMaterialsInformationList', tmsMaterialsInformationRowIdx, tmsMaterialsInformationTpl, data[i]);
                                tmsMaterialsInformationRowIdx = tmsMaterialsInformationRowIdx + 1;
                            }
                        });
					</script>
				</div>
			</div>
		</div>
		</div>
		<div id="tab-02" class="tab-pane fade">

			<table class="table table-bordered"><tbody>
			<tr>
				<td class="width-10 active"><label class="pull-right">委托单号：</label></td>
				<td class="width-23">
					<form:input path="entrustNumber" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">项目名称：</label></td>
				<td class="width-23">
					<form:input path="projectName" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">回单状态：</label></td>
				<td class="width-23">
					<form:input path="status" htmlEscape="false"    class="form-control "/>
				</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">运输方式：</label></td>
				<td class="width-23">
					<form:input path="transportMode" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">结算方式：</label></td>
				<td class="width-23">
					<form:input path="clearingMode" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">结算类型：</label></td>
				<td class="width-23">
					<form:input path="clearingType" htmlEscape="false"    class="form-control "/>
				</td>
			</tr>
			<tr>

				<td class="width-10 active"><label class="pull-right">起运地：</label></td>
				<td class="width-23">
					<form:input path="contractDistance" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">要求到货时间：</label></td>
				<td class="width-23">
					<p class="input-group">
					<div class='input-group form_datetime' id='arrivalTime'>
						<input type='text'  name="arrivalTime" class="form-control "  value="<fmt:formatDate value="${transportPlanning.arrivalTime}" pattern="yyyy-MM-dd HH:00"/>"/>
						<span class="input-group-addon">
			                        <span class="glyphicon glyphicon-calendar"></span>
			                    </span>
					</div>
					</p>
				</td>
				<td class="width-10 active"><label class="pull-right">特点：</label></td>
				<td class="width-23">
					<sys:checkbox id="characteristic" name="characteristic" items="${fns:getDictList('td_characteristic')}" values="${transportPlanning.characteristic}" cssClass="i-checks "/>
				</td>
			</tr>
			</tbody></table>
		</div>
		<div id="tab-03" class="tab-pane fade ">
			<table class="table table-bordered">
				<tbody>
				<tr>
					<td class="width-10 active"><label class="pull-right">配载单号：</label></td>
					<td class="width-23">
						<form:input path="numbers" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-10 active"><label class="pull-right">配载日期：</label></td>
					<td class="width-23">
						<input type='text'  name="stowageDate" class="form-control "  value="<fmt:formatDate value="${tmsWaybill.stowageDate}" pattern="yyyy-MM-dd HH:00"/>"/>

					</td>
					<td class="width-10 active"><label class="pull-right">调度人员：</label></td>
					<td class="width-23">
						<input name="dispatchName.id" type="hidden" htmlEscape="false" value="${tmsWaybill.dispatchName.id}"   class="form-control "/>
						<input id="dispatchName" name="dispatchName.name" htmlEscape="false" value="${tmsWaybill.dispatchName.name}"   class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-10 active"><label class="pull-right">现场督导：</label></td>
					<td class="width-23">
						<input id="guidance" name="guidance.name" htmlEscape="false" value="${tmsWaybill.guidance.name}"   class="form-control "/>
						<input  name="guidance.id" htmlEscape="false" type="hidden" value="${tmsWaybill.guidance.id}"   class="form-control "/>

					</td>
					<td class="width-10 active"><label class="pull-right">托运类型：</label></td>
					<td class="width-23">
						<form:input path="consign" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-10 active"><label class="pull-right">预计到场时间：</label></td>
					<td class="width-23">
						<form:input path="presentTime" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
					<%--<tr>--%>

					<%--<td class="width-15 active"><label class="pull-right">单据状态：</label></td>--%>
					<%--<td class="width-35">--%>
					<%--<form:input path="receiptsStatus" htmlEscape="false"    class="form-control "/>--%>
					<%--</td>--%>
					<%--</tr>--%>
				<tr>
					<td class="width-10 active"><label class="pull-right">承运商：</label></td>
					<td class="width-23">
						<form:input path="commonCarrier" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-10 active"><label class="pull-right">承运商联系人：</label></td>
					<td class="width-23">
						<form:input path="contacts" htmlEscape="false"    class="form-control "/>
					</td>
					<td colspan="2"></td>
				</tr>
				<tr>
					<td class="width-10 active"><label class="pull-right">车牌号码：</label></td>
					<td class="width-23">
						<form:input path="plateNumber" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-10 active"><label class="pull-right">行驶证号：</label></td>
					<td class="width-23">
						<form:input path="drivingLicense" htmlEscape="false"    class="form-control "/>
					</td>
					<td colspan="2"></td>
				</tr>
				<tr>
					<td class="width-10 active"><label class="pull-right">司机姓名：</label></td>
					<td class="width-23">
						<form:input path="driverName" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-10 active"><label class="pull-right">司机电话：</label></td>
					<td class="width-23">
						<form:input path="driverPhone" htmlEscape="false"    class="form-control "/>
					</td>
					<td colspan="2"></td>
				</tr>
				<tr>
					<td class="width-10 active"><label class="pull-right">车辆类型：</label></td>
					<td class="width-23">
						<form:input path="vehicleType" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-10 active"><label class="pull-right">驾驶证号：</label></td>
					<td class="width-23">
						<form:input path="driveNumber" htmlEscape="false"    class="form-control "/>
					</td>
					<td colspan="2"></td>
				</tr>
				<tr>
					<td class="width-10 active"><label class="pull-right">提货流程：</label></td>
					<td class="width-89" colspan="5">
						<form:input path="delivery" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-10 active"><label class="pull-right">送货流程：</label></td>
					<td class="width-89" colspan="5">
						<form:input path="gaveCommodity" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-10 active"><label class="pull-right">注意事项：</label></td>
					<td class="width-89" colspan="5">
						<form:input path="attention" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				</tbody>
			</table>
		</div>
	<div id="tab-04" class="tab-pane fade ">
		<table class="table table-bordered">
			<tbody>
			<tr>
				<td class="width-10 active"><label class="pull-right"><span style="color: red">*</span>收款人姓名：</label></td>
				<td class="width-23">
					<form:input path="payeeName" htmlEscape="false"    class="form-control required"/>
				</td>
				<td class="width-10 active"><label class="pull-right"><span style="color: red">*</span>卡号：</label></td>
				<td class="width-23">
					<form:input path="cardNumber" htmlEscape="false"    class="form-control required"/>
				</td>
				<td class="width-10 active"><label class="pull-right"><span style="color: red">*</span>开户行：</label></td>
				<td class="width-23">
					<form:input path="bankAddress" htmlEscape="false"    class="form-control required"/>
				</td>
			</tr>
			<tr>

				<td class="width-10 active"><label class="pull-right"><span style="color: red">*</span>装货付款：</label></td>
				<td class="width-23">
					<form:input path="loadingPayment" htmlEscape="false" onblur="bb()"   class="form-control required"/>
				</td>
				<td class="width-10 active"><label class="pull-right">支付方式：</label></td>
				<td class="width-23">
					<form:select path="loadingPaymentWay" class="form-control ">
						<form:options items="${fns:getDictList('pay_method_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>

				</td>
				<td class="width-10 active"><label class="pull-right">油卡卡号：</label></td>
				<td class="width-23">
					<form:input path="loadingCardNumber" htmlEscape="false"    class="form-control "/>
				</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right"><span style="color: red">*</span>货到付款：</label></td>
				<td class="width-23">
					<form:input path="kdPayment" htmlEscape="false"  onblur="bb()"   class="form-control required"/>
				</td>
				<td class="width-10 active"><label class="pull-right"><span style="color: red">*</span>凭回执结算：</label></td>
				<td class="width-23">
					<form:input path="receiptCalculate" htmlEscape="false" onblur="bb()"   class="form-control required"/>
				</td>
				<td class="width-10 active"><label class="pull-right">油卡金额(装货)：</label></td>
				<td class="width-23">
					<form:input path="loadingJe" htmlEscape="false"    class="form-control "/>

				</td>

			</tr>


			<tr>

				<td class="width-10 active"><label class="pull-right">合同费用：</label></td>
				<td class="width-23">
					<form:input path="totalCost" htmlEscape="false"  readonly="true"   class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">租车协议号：</label></td>
				<td class="width-23">
					<input id="forwardingPrice" placeholder="保存后自动生成" value="${tmsWaybill.forwardingPrice}" name="forwardingPrice" htmlEscape="false" readonly="true"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right"><span style="color: red">*</span>租车费用：</label></td>
				<td class="width-23">
					<form:input path="rentingCost" htmlEscape="false"  onblur="bb()"  class="form-control required"/>
				</td>

			</tr>
			<tr><td class="width-10 active"><label class="pull-right">总运费：</label></td>
				<td class="width-23">
					<form:input path="freight" htmlEscape="false" readonly="true"   class="form-control "/>
				</td>

				<td class="width-10 active"><label class="pull-right">绩效运价：</label></td>
				<td class="width-23">
					<form:input path="performancePrice" htmlEscape="false"    class="form-control "/>
				</td>
				<td class="width-10 active"><label class="pull-right">历史运价：</label></td>
				<td class="width-23">
					<form:input path="historyPrice" htmlEscape="false"    class="form-control "/>
				</td>
			</tr>
			</tbody>
		</table>
		<div class="tabs-container">
			<ul class="nav nav-tabs">
				<li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">运单附加费用：</a>
				</li>
			</ul>
			<div class="tab-content">
				<div id="tab-1" class="tab-pane fade in  active">
					<a class="btn btn-white btn-sm" onclick="addRow('#tmsAdditionalChargeList', tmsAdditionalChargeRowIdx, tmsAdditionalChargeTpl);tmsAdditionalChargeRowIdx = tmsAdditionalChargeRowIdx + 1;" title="新增"><i class="fa fa-plus"></i> 新增</a>
					<table class="table table-striped table-bordered table-condensed">
						<thead>
						<tr>
							<th class="hide"></th>
							<th>收支类型</th>
							<th>金额</th>
							<th>数量</th>
							<th>单价</th>
							<th>备注信息</th>
							<th width="10">&nbsp;</th>
						</tr>
						</thead>
						<tbody id="tmsAdditionalChargeList">
						</tbody>
					</table>
					<script type="text/template" id="tmsAdditionalChargeTpl">//<!--
				<tr id="tmsAdditionalChargeList{{idx}}">
					<td class="hide">
						<input id="tmsAdditionalChargeList{{idx}}_id" name="tmsAdditionalChargeList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
						<input id="tmsAdditionalChargeList{{idx}}_delFlag" name="tmsAdditionalChargeList[{{idx}}].delFlag" type="hidden" value="0"/>
					</td>

					<td>
					<select id="tmsAdditionalChargeList{{idx}}_balanceType" name="tmsAdditionalChargeList[{{idx}}].balanceType" data-value="{{row.balanceType}}" class="form-control m-b  ">
							<option value=""></option>
							<c:forEach items="${fns:getDictList('fee_type')}" var="dict">
								<option value="${dict.value}">${dict.label}</option>
							</c:forEach>
						</select>

<%--<select name="tmsAdditionalChargeList[{{idx}}].balanceType" id="tmsAdditionalChargeList{{idx}}_balanceType" class="form-control ">--%>
					<%--<option  value="收入">收入</option>--%>
					<%--<option  value="支出">支出</option>--%>
					<%--</select>					</td>--%>


					<td>
						<input id="tmsAdditionalChargeList{{idx}}_money" name="tmsAdditionalChargeList[{{idx}}].money" type="text" value="{{row.money}}"    class="form-control "/>
					</td>


					<td>
						<input id="tmsAdditionalChargeList{{idx}}_quantity" name="tmsAdditionalChargeList[{{idx}}].quantity" type="text" value="{{row.quantity}}"    class="form-control "/>
					</td>


					<td>
						<input id="tmsAdditionalChargeList{{idx}}_unitPrice" name="tmsAdditionalChargeList[{{idx}}].unitPrice" type="text" value="{{row.unitPrice}}"    class="form-control "/>
					</td>


					<td>
						<input  id="tmsAdditionalChargeList{{idx}}_remarks" name="tmsAdditionalChargeList[{{idx}}].remarks" rows="4"  value="{{row.remarks}}"  class="form-control "/>
					</td>

					<td class="text-center" width="10">
						{{#delBtn}}<span class="close" onclick="delRow(this, '#tmsAdditionalChargeList{{idx}}')" title="删除">&times;</span>{{/delBtn}}
					</td>
				</tr>//-->
					</script>
					<script type="text/javascript">
                        var tmsAdditionalChargeRowIdx = 0, tmsAdditionalChargeTpl = $("#tmsAdditionalChargeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                        $(document).ready(function() {
                            var data = ${fns:toJson(tmsWaybill.tmsAdditionalChargeList)};
                            for (var i=0; i<data.length; i++){
                                addRow('#tmsAdditionalChargeList', tmsAdditionalChargeRowIdx, tmsAdditionalChargeTpl, data[i]);
                                tmsAdditionalChargeRowIdx = tmsAdditionalChargeRowIdx + 1;
                            }
                        });
					</script>
				</div>

			</div>
		</div>
	</div>



	<div id="tab-05" class="tab-pane fade">
		<table class="table table-bordered">
			<tbody>
			<tr>
				<th>序号</th>
				<th>节点名称</th>
				<th>到达时间</th>
				<th>离开时间</th>
				<th>更换车牌号</th>
				<th>更换联系电话</th>
				<th>备注</th>
			</tr>
			<tr>
				<th>1</th>
				<th>提货地</th>
				<td><fmt:formatDate value="${tailAfter.thArrivalTime}" pattern="yyyy-MM-dd HH:00"/></td>
				<td><fmt:formatDate value="${tailAfter.thDepartureTime}" pattern="yyyy-MM-dd HH:00"/></td>
				<td>${tailAfter.thChangeNumber}</td>
				<td>${tailAfter.thChangePhone}</td>
				<td>${tailAfter.thRemarks}</td>
			</tr>
			<tr>
				<th>2</th>
				<th>中转机构1</th>
				<td><fmt:formatDate value="${tailAfter.agenciesArrivalTime}" pattern="yyyy-MM-dd HH:00"/></td>
				<td><fmt:formatDate value="${tailAfter.agenciesDepartureTime}" pattern="yyyy-MM-dd HH:00"/></td>
				<td>${tailAfter.agenciesChangeNumber}</td>
				<td>${tailAfter.agenciesChangePhone}</td>
				<td>${tailAfter.agenciesRemarks}</td>
			</tr>
			<tr>
				<th>3</th>
				<th>中转机构2</th>
				<td><fmt:formatDate value="${tailAfter.agArrivalTime}" pattern="yyyy-MM-dd HH:00"/></td>
				<td><fmt:formatDate value="${tailAfter.agDepartureTime}" pattern="yyyy-MM-dd HH:00"/></td>
				<td>${tailAfter.agChangeNumber}</td>
				<td>${tailAfter.agChangePhone}</td>
				<td>${tailAfter.agRemarks}</td>
			</tr>
			<tr>
				<th>4</th>
				<th>到货地</th>
				<td><fmt:formatDate value="${tailAfter.apArrivalTime}" pattern="yyyy-MM-dd HH:00"/></td>
				<td><fmt:formatDate value="${tailAfter.apDepartureTime}" pattern="yyyy-MM-dd HH:00"/></td>
				<td>${tailAfter.apChangeNumber}</td>
				<td>${tailAfter.apChangePhone}</td>
				<td>${tailAfter.apRemarks}</td>
			</tr>
			<tr>
				<th>5</th>
				<th>收货客户</th>
				<td><fmt:formatDate value="${tailAfter.clientArrivalTime}" pattern="yyyy-MM-dd HH:00"/></td>
				<td><fmt:formatDate value="${tailAfter.clientDepartureTime}" pattern="yyyy-MM-dd HH:00"/></td>
				<td>${tailAfter.clientChangeNumber}	</td>
				<td>${tailAfter.clientChangePhone}</td>
				<td>${tailAfter.remarks}</td>
			</tr>

			</tbody>
		</table>
		<div style="height:60px;"></div>
		<table class="table table-bordered">
			<tr>
				<th>序号</th>
				<th>跟踪时间</th>
				<th>跟踪类型</th>
				<th>跟踪状态</th>
				<th>跟踪位置</th>
				<th>备注</th>
			</tr>
			<c:forEach varStatus="index" items="${notnode}" var="node">
				<tr>
					<td>${index.index+1}</td>
					<td>${node.trackTime}</td>
					<td>${node.trackType}</td>
					<td>${node.trackState}</td>
					<td>${node.trackLocation}</td>
					<td>${node.remarks}</td>
				</tr>
			</c:forEach>
		</table>
	</div>
	<div id="tab-06" class="tab-pane fade">
		<table class="table table-bordered">
			<tbody>
			<tr>
				<th>序号</th>
				<th>节点名称</th>
				<th>签收状态</th>
				<th>签收人</th>
				<th>装车件数</th>
				<th>签收件数</th>
				<th>缺货量</th>
				<th>签收时间</th>
				<th>赔付说明</th>
				<th>备注</th>
			</tr>
			<tr>
				<th>1</th>
				<th>客户签收</th>
				<td>${receipt.clienteleCollectState}</td>
				<td>${receipt.clienteleCollectName}</td>
				<td>${receipt.clienteleEntruckingNumber}</td>
				<td>${receipt.clienteleSignNumber}</td>
				<td>${receipt.clienteleStockout}</td>
				<td><fmt:formatDate value="${receipt.clienteleSignTime}" pattern="yyyy-MM-dd HH:00"/>
				</td>
				<td>${receipt.clienteleCompensate}</td>
				<td>${receipt.clienteleRemarks}</td>
			</tr>
			<tr>
				<th>2</th>
				<th>到公司</th>
				<td>${receipt.companyCollectState}</td>
				<td>${receipt.companyCollectName}</td>
				<td>${receipt.companyEntruckingNumber}</td>
				<td>${receipt.companySignNumber}</td>
				<td>${receipt.companyStockout}</td>
				<td><fmt:formatDate value="${receipt.companySignTime}" pattern="yyyy-MM-dd HH:00"/>
				</td>
				<td>${receipt.companyCompensate}</td>
				<td>${receipt.companyRemarks}</td>
			</tr>
			<tr>
				<th>3</th>
				<th>到货主</th>
				<td>${receipt.shipperCollectState}</td>
				<td>${receipt.shipperCollectName}</td>
				<td>${receipt.shipperEntruckingNumber}</td>
				<td>${receipt.shipperSignNumber}</td>
				<td>${receipt.shipperStockout}</td>
				<td><fmt:formatDate value="${receipt.shipperSignTime}" pattern="yyyy-MM-dd HH:00"/>
				</td>
				<td>${receipt.shipperCompensate}</td>
				<td>${receipt.remarks}</td>
			</tr>


			</tbody>
		</table>
	</div>
	<div id="tab-07" class="tab-pane fade">
		<table class="table table-bordered">
			<tbody>
			<tr>
				<td colspan="6" style="background-color: grey;color: red ;text-align: center"  >基本信息</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">发生时间：</label></td>
				<td class="width-23"><fmt:formatDate value="${accident.occurrenceTime}" pattern="yyyy-MM-dd HH:00"/>
				</td>
				<td class="width-10 active"><label class="pull-right">地点：</label></td>
				<td class="width-23">${accident.site}
				</td>
				<td class="width-10 active"><label class="pull-right">事故类型：</label></td>
				<td class="width-23">
					${accident.accidentType}
				</td>
			</tr>
			<tr>

				<td class="width-10 active"><label class="pull-right">反馈人：</label></td>
				<td class="width-23">
					${accident.feedbackPeople}
				</td>

				<td class="width-10 active"><label class="pull-right">电话：</label></td>
				<td class="width-23">
					${accident.phone}
				</td>
				<td class="width-10 active"><label class="pull-right">反馈时间：</label></td>
				<td class="width-23"><fmt:formatDate value="${accident.feedbackTime}" pattern="yyyy-MM-dd HH:00"/>
				</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">运单号：</label></td>
				<td class="width-23">${accident.waybillNumber}
				</td>
				<td class="width-10 active"><label class="pull-right">状态：</label></td>
				<td class="width-23">${accident.state}
				</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">事故描述：</label></td>
				<td class="width-89" colspan="5">${accident.accidentDescription}
				</td>

			</tr>
			<tr>
				<td colspan="6" style="background-color: grey;color: red ;text-align: center"  >理赔情况</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">客户要求赔偿金额：</label></td>
				<td class="width-23">${accident.seekRedress}
				</td>
				<td class="width-10 active"><label class="pull-right">实际赔偿金额：</label></td>
				<td class="width-23">${accident.practicalCompensate}
				</td>
				<td class="width-10 active"><label class="pull-right">说明：</label></td>
				<td class="width-23">${accident.explains}
				</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">要求完成日期：</label></td>
				<td class="width-23"><fmt:formatDate value="${accident.accomplishDate}" pattern="yyyy-MM-dd HH:00"/>
				</td>
				<td class="width-10 active"><label class="pull-right">实际处理日期：</label></td>
				<td class="width-23"><fmt:formatDate value="${accident.disposeDate}" pattern="yyyy-MM-dd HH:00"/>
				</td>
				<td class="width-10 active"><label class="pull-right">处理人：</label></td>
				<td class="width-23">${accident.conductor}
				</td>
			</tr>
			<tr>

				<td class="width-10 active"><label class="pull-right">赔偿说明 ：</label></td>
				<td class="width-89" colspan="5">${accident.lossExplain}
				</td>
			</tr>
			<tr>
				<td colspan="6" style="background-color: grey;color: red ;text-align: center"  >追损情况</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">扣损金额：</label></td>
				<td class="width-23">${accident.lossMoney}
				</td>
				<td class="width-10 active"><label class="pull-right">扣损对象：</label></td>
				<td class="width-23">${accident.lossObject}
				</td>
				<td class="width-10 active"><label class="pull-right">说明(追损)：</label></td>
				<td class="width-23">${accident.explainOne}
				</td>
			</tr>
			<tr>

				<td class="width-10 active"><label class="pull-right">要求完成日期(追损)：</label></td>
				<td class="width-23"><fmt:formatDate value="${accident.damageDate}" pattern="yyyy-MM-dd HH:00"/>
				</td>
				<td class="width-10 active"><label class="pull-right">实际处理日期(追损)：</label></td>
				<td class="width-23"><fmt:formatDate value="${accident.zsDate}" pattern="yyyy-MM-dd HH:00"/>
				</td>
				<td class="width-10 active"><label class="pull-right">处理人(追损)：</label></td>
				<td class="width-23">${accident.conductors}
				</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">扣损说明：</label></td>
				<td class="width-89" colspan="5">${accident.total}
				</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">货物残损值说明：</label></td>
				<td class="width-89" colspan="5">${accident.damagedExplain}
				</td>
			</tr>
			<tr>
				<td colspan="6" style="background-color: grey;color: red ;text-align: center"  >保险处理</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">保险公司：</label></td>
				<td class="width-23">${accident.insuranceCompany}
				</td>
				<td class="width-10 active"><label class="pull-right">办案人员：</label></td>
				<td class="width-23">${accident.handlePersonnel}
				</td>
				<td class="width-10 active"><label class="pull-right">联系电话：</label></td>
				<td class="width-23">${accident.relationPhone}
				</td>
			</tr>
			<tr>

				<td class="width-10 active"><label class="pull-right">保险报案时间：</label></td>
				<td class="width-23"><fmt:formatDate value="${accident.reportTime}" pattern="yyyy-MM-dd HH:00"/>
				</td>
				<td class="width-10 active"><label class="pull-right">保险赔偿金额：</label></td>
				<td class="width-23">${accident.indemnityMoney}
				</td>
				<td class="width-10 active"><label class="pull-right">赔偿日期：</label></td>
				<td class="width-23"><fmt:formatDate value="${accident.compensateDate}" pattern="yyyy-MM-dd HH:00"/>
				</td>
			</tr>
			<tr>
				<td class="width-10 active"><label class="pull-right">处理说明：</label></td>
				<td class="width-89" colspan="5">${accident.processingSpecification}
				</td>
			</tr>
			</tbody>
		</table>
	</div>
	</form:form>
</div>
</body>
</html>